package object;

public class IntegerDemo {
    public static void main(String[] args) {
        Integer i1 = new Integer(5);
        Integer i2 = new Integer(5);
        System.out.println(i1);
        System.out.println(i1.equals(i2));

        Integer i3 = Integer.valueOf(5);
        Integer i4 = Integer.valueOf(5);
        System.out.println(i3==i4);
        System.out.println(i3.equals(i4));

        int i = i3.intValue();
        System.out.println(i);

        Double i5 = Double.valueOf(5);
        Double i6 = Double.valueOf(5);
        System.out.println(i5==i6);
        System.out.println(i5.equals(i6));

        Integer i7 = 1000;
        Integer i8 = 1000;
        int i9 = i7;
        System.out.println(i7==i8);
        System.out.println(i7.equals(i8));

        int max = Integer.MAX_VALUE;
        int min = Integer.MIN_VALUE;
        System.out.println("最大值为："+max+",最小值为："+min);

        int a = (int)39.7;
        System.out.println(a);

        String str1 = "300";
        Integer a1 = Integer.parseInt(str1);
        Integer a2 = Integer.parseInt(str1);
        System.out.println(a1==a2);
        System.out.println(a1.equals(a2));


    }
}
